# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-matplotlib-venn
_pkgorig=matplotlib-venn
pkgver=0.11.9
pkgrel=3
pkgdesc="Functions for plotting area-proportional two- and three-way Venn diagrams in matplotlib"
url="https://github.com/konstantint/matplotlib-venn"
arch="noarch !riscv64" # py3-matplotlib
license="MIT"
depends="python3 py3-matplotlib py3-scipy py3-numpy"
checkdepends="py3-pytest-xdist"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/konstantint/$_pkgorig/archive/$pkgver/$_pkgorig-$pkgver.tar.gz
	fix-imports.patch"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
c59bbd697497e090355d761fd11d65f05e28f4650b6c258173a4ac1ce63b32ec16866626a309ff2fbabf282b23e3e76db38599e61a09f6978a46814a5cc8aa6f  py3-matplotlib-venn-0.11.9.tar.gz
a5886263f373fa1705b4afc93488338e5f09296bb6640bea4ff865fa5485e95c1299aa7208d741652a903fbb26beb30069f2a2adb0b74ba1da8414d0ac8885cb  fix-imports.patch
"
